<?php

/**
 * Class used to interact with roles returned by EVE API.
 *
 * @package eveApi
 *
 */

/**
 * Include the file that provides the eveapi class
 *
 */
require_once('eveapi.class.php');

/**
 * class Eve
 * @package eveApi
 *
 */
class Eve extends eveapi{

	/**
	 * getAllianceList
	 * gets a list of all alliances in game
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getAllianceList(){
		$path = "/eve/AllianceList.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getCerificateTree
	 * Gets the certificates within Eve
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getCertificateTree(){
		$path = "/eve/CertificateTree.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getCharacterID
	 * Gets the CharacterID from the API based on the character name
	 * 
	 * @param string names comma seperated list of names to get ID's
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getCharacterID($names){
		// $names should be comma seperated list of names to get
		$params['names'] = (string)$names;
		$path = "/eve/CharacterID.xml.aspx";
		return $this->retreiveXML($path,$params);
	}

	/**
	 * getCharacterInfo
	 * Gets the character data 
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getCharacterInfo(){
		$path = "/eve/CharacterInfo.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getCharacterNames
	 * Gets the character names from the list of provided ID's
	 * 
	 * @param string comma seperated list of ID's to get names for
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getCharacterNames($ids){
		$params['ids'] = $ids;
		$path = "/eve/CharacterNamexml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getConquerableStationsList
	 * Gets the conquerable stations 
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getConquerableStationsList(){
		$path = "/eve/ConquerableStationList.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getErrorList
	 * gets a list of errors provided by the Eve API
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getErrorList(){
		$path = "/eve/ErrorList.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getFactionalWarfareStatistics
	 * Gets the Fac War Statistics
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getFactionalWarfareStatistics(){
		$path = "/eve/FacWarStats.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getFactionalWarfareTopStatistics
	 * Gets the Fac War Statistics for top characters
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getFactionalWarfareTopStatistics(){
		$path = "/eve/FacWarTopStats.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getReferenceTypes
	 * Gets the Wallet Transaction types
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getReferenceTypes(){
		$path = "/eve/RefTypes.xml.aspx";
		return $this->retreiveXML($path);
	}

	/**
	 * getSkillTree
	 * Gets the list of current in game skills
	 * 
	 * @return mixed SimpleXMLObject generated from API
	 *
	 */
	function getSkillTree(){
		$path = "/eve/SkillTree.xml.aspx";
		return $this->retreiveXML($path);
	}

}

?>
